Data processing devices that employ arrays of working memory banks, such as cache or scratchpad memory bank arrays, are well known in the art. The availability of such working memory enables a processing engine of the processing device to temporarily access and store data for calculations and other work in progress in an efficient manner. Generally, this avoids having to await retrieval of data during the particular processing operation from a main memory or other source and also avoids having to store intermediate results of a particular processing operation to main memory.
When data is accessed in a working memory by a processing engine, it may be modified during a processing operation such that it may no longer reflect the contents of the main memory or other source where it had been retrieved. Conventionally, this results in the working memory containing both “clean” and “dirty” data entries where a clean data entry accurately reflects the contents of main memory or other source as originally retrieved and where a dirty data entry may not. A flag may be set with respect to a particular data entry or block of data entries indicating that the entry or block contains clean or dirty data.
After a processing operation or a series of processing operations have been completed, some or all of the working memory may be cleared for further use in subsequent operations. In such cleaning of the working memory, generally clean data entries are discarded and dirty data entries are written to main memory so that the main memory is updated with the results of the processing operations that had been performed. In some instances, the dirty data entries may also be discarded such as when they represent intermediate results remaining after completion of a processing operation.
Working memory may generally be employed with any type of data processing device, including, but not limited to, a central processing unit (CPU), a graphics processing unit (GPU), and an accelerated processing unit (APU). Often such processing devices are incorporated into battery powered units where power conservation is an important consideration in extending battery life for a particular device.